package com.ee.chat.admin.controller.usermanage;

import com.ee.chat.admin.service.IUserService;
import com.ee.chat.common.bean.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("invite")
public class InviteController {
    private Logger log = LoggerFactory.getLogger(InviteController.class);

    @Resource
    IUserService userService;

    /**
     * 邀请明细列表
     * @Author Shane
     * @Date 2019/10/25 21:08
     * @return
     */
    @RequestMapping("list")
    public Result list(HttpServletRequest request, Integer inviteUserId, Integer userId, Integer type,
                       String createTime, @RequestParam Integer page, @RequestParam Integer limit){
        try {
            return userService.inviteUserList(request, inviteUserId, userId, type, createTime, page, limit);
        } catch (Exception e){
            log.error("【查询邀请明细错误】", e);
        }
        return Result.returnFailure();
    }

}
